#include "bsp.h"

#ifdef FLASH_TEST
uint32_t JEDECID;
uint16_t Manufacturer_ID;
uint8_t DeviceID;
uint8_t text[8] = {0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08};
uint8_t read_text[8];
#endif

void bsp_init(void)
{

    bsp_spi_flash_w25qxx_Init();

#ifdef FLASH_TEST
    JEDECID = W25Qxx_Read_JEDECID();
    Manufacturer_ID = W25Qxx_Read_Manufacturer_ID();
    DeviceID = W25Qxx_Read_DeviceID();

    W25Qxx_Sector_Erase(0x0); // 写入之前要先擦除
    W25Qxx_Write_Flash(text,0,sizeof(text));		
    W25Qxx_Read_Flash(read_text,0,sizeof(read_text));
#endif
}






